package com.cskaoyan.catmall.dao;

import com.cskaoyan.catmall.model.bo.RoleBo;
import com.cskaoyan.catmall.model.pojo.ApiPojo;
import com.cskaoyan.catmall.model.vo.PermissionInfoVo;
import com.cskaoyan.catmall.model.vo.RoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 逍遥子
 * @Date: 2022/01/08/18:40
 * @Description:
 */

public interface RoleDao {

    List<RoleVo.ListDTO> selectRole(RoleBo roleBo);

    int insertRole(RoleBo roleBo);

    int deleteRole(RoleBo roleBo);

    int updatePermission(@Param("list") Object[] list, @Param("roleId") Integer roleId);

    int deletePermission(@Param("list") Object[] list, @Param("roleId") Integer roleId);

    String[] selectPermission(Integer roleId);

    int updateRoleInfo(RoleBo roleBo);

    List<PermissionInfoVo.SystemPermissionsDTO> selectSystemPermissions(Integer id);

    List<PermissionInfoVo.SystemPermissionsDTO.ChildrenDTO> selectSysCategory(Integer id);

    List<ApiPojo> selectApi(Integer id);

}
